home *** CD-ROM | disk | FTP | other *** search
- Path: access1.digex.net!not-for-mail
- From: ell@access1.digex.net (Ell)
- Newsgroups: comp.lang.c++
- Subject: Re: How can I include IOSTREAM.H only once?
- Date: 10 Mar 1996 02:52:58 GMT
- Organization: The Universe
- Message-ID: <4htg6a$593@news4.digex.net>
- References: <4hbi55$899@sam.inforamp.net> <4hc09v$136@news1.usa.pipeline.com> <4hj42l$elu@sam.inforamp.net> <4hqck8$fvc@uuneo.neosoft.com> <4hsgid$pmm@sam.inforamp.net>
- NNTP-Posting-Host: access1.digex.net
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- Randy Charles Morin (rmorin@inforamp.net) wrote:
- : In article <4hqck8$fvc@uuneo.neosoft.com>,
- : Wmatthew@lan-aces.com (W. Matthews) wrote:
- : >I haven't seen the entire string relating to this, but some compilers have
- : >a useful #define statement in the include files.
- : >The way to take advantage of this is to do something along the following
- : >lines in each source module that may include a particular header. However,
- : >this does not work in every situation: (I use stdio.h as an example)
- : >#ifndef __STDIO__
- : >#include <stdio.h>
- : >#endif
-
- And generally the '#endif' is the last of code in the file.
-
- #ifndef __STDIO__
- #include <stdio.h>
- /*...code...*/
- /*...code...*/
- #endif
-
- Elliott
-